<?php 
include TEMPLATEPATH.'/controllers/isset-page.php';
?>
<?php 
	$args = array('title_li'  => '','orderby' => 'id','taxonomy' => 'category','exclude'	=> array(1),'hide_empty' => 0,'parent' =>0,'hierarchical'  => true,'depth'  => 1);
	$list_category =  get_categories($args);
	//print_r($list_category);
?> 
<div class="menu">
		<div class="body_menu">
		<input type="hidden" id="link_template_url" value="<?php echo WP_MYSITE_TEMPLATE_URL;?>">
			<ul>
				<li><a <?php echo $mn_home;?> href="<?php echo WP_MYSITE_URL;?>">Trang chủ</a></li>				
				<li><a <?php echo $mn_sanpham;?> href="<?php echo WP_MYSITE_URL;?>/san-pham">Sản phẩm</a>
					<?php 
					if($list_category)
					{
					?>
					<div class="sub_menu">
						<?php 
						foreach ($list_category as $value) 
						{
						?>
						<span>
							<a class="bt" href="<?php echo get_category_link($value->term_id);?>"><?php echo $value->name;?></a>
							<?php 
								$child = array('title_li'  => '','orderby' => 'id','taxonomy' => 'category','exclude'	=> array(1),'hide_empty' => 0,'parent' =>$value->term_id,'hierarchical'  => true,'depth'  => 1);
								$list_child =  get_categories($child);
								//print_r($list_category);
								if($list_child)
								{
									echo '<div class="sub_menu2">';
									foreach ($list_child as $value) 
									{
									?>									
										<a href="<?php echo get_category_link($value->term_id);?>"><?php echo $value->name;?></a>
									<?php 
									}
									echo '</div>';
								}
							?>
						</span>
						<?php 	
						}
						?>
					</div>
					<?php 	
					}
					?>
					
				</li>
				<li><a <?php echo $mn_dichvu;?> href="<?php echo WP_MYSITE_URL;?>/dich-vu">Dịch vụ</a></li>
				<li><a <?php echo $mn_duan;?> href="<?php echo WP_MYSITE_URL;?>/du-an">Dự án</a></li>
				<li><a <?php echo $mn_khachhang;?> href="<?php echo WP_MYSITE_URL;?>/khach-hang">Khách hàng</a></li>
				<li><a <?php echo $mn_tintuc;?> href="<?php echo WP_MYSITE_URL;?>/tin-tuc">Tin tức</a></li>
				<li style="background:none"><a <?php echo $mn_lienhe;?> href="<?php echo WP_MYSITE_URL;?>/lien-he">Liên hệ</a></li>
			</ul>
			<div class="seach_bg">
			<form action="<?php echo WP_MYSITE_URL;?>" method="get">
				<img src="<?php echo WP_MYSITE_TEMPLATE_URL;?>/images/left_seach.jpg" alt="" />
				<div class="minds_seach">
					<input type="text" name="s" id="s"  onblur="if(this.value=='')this.value='Nhập từ khóa..'" onfocus="if(this.value=='Nhập từ khóa..')this.value=''" value="Nhập từ khóa.."/>
				</div>
				<input type="image" name="send-search" src="<?php echo WP_MYSITE_TEMPLATE_URL;?>/images/right_seach.jpg" id="btn_search"/>
				<!-- <a href=""><img src="<?php echo WP_MYSITE_TEMPLATE_URL;?>/images/right_seach.jpg" alt="" /></a> -->
			</form>	
			</div>
		</div>
	</div>